home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Simulation / PDP-8 Simulator / Source Code / Assembler / Global.t < prev    next >
Encoding:
Text File  |  1992-03-15  |  1.4 KB  |  122 lines  |  [TEXT/KAHL]

  1. /************************************************************
  2. *
  3. *
  4. *    Header containing all type declarations.
  5. *
  6. *    by Adrian Bool in cooperation with Graham Cox.
  7. *
  8. *    copyright © phantasm coding 1992.
  9. *
  10. *
  11. ************************************************************/
  12.  
  13. /* main types */
  14.  
  15. typedef unsigned short addressType;
  16. typedef unsigned short wordType;
  17. typedef unsigned short biggestType;
  18. typedef char str255[255];
  19. typedef wordType rBlock[255];
  20.  
  21. /* object types */
  22.  
  23. typedef wordType **oStHandle;
  24.  
  25. typedef struct
  26.     {
  27.     short version;
  28.     addressType startAddress;
  29.     long size;
  30.     wordType **storage;
  31.     addressType position;
  32.     addressType address;
  33.     }
  34.     object;
  35.  
  36. typedef object **oHandle;
  37.  
  38. /* source types */
  39.  
  40. typedef char **sStHandle;
  41. typedef char sName[21];
  42.  
  43. typedef struct
  44.     {
  45.     SFReply    fileSpec;
  46.     sStHandle storage;
  47.     long size;
  48.     long caret;
  49.     long line;
  50.     }
  51.     source;
  52.     
  53. typedef source **sHandle;
  54.  
  55. /* label types */
  56.  
  57. typedef char lName[8];
  58. typedef unsigned int lValue;
  59.  
  60. struct lInfo
  61.     {
  62.     lName name;
  63.     lValue value;
  64.     struct lInfo **next;
  65.     };
  66.  
  67. typedef struct lInfo label , **lHandle;
  68.  
  69. /* assemble types */
  70.  
  71. typedef struct
  72.     {
  73.     sHandle sourceCode;
  74.     oHandle objectCode;
  75.     lHandle labelHeader;
  76.     }
  77.     program;
  78.     
  79. typedef program **pHandle;
  80.  
  81.  
  82. /* opcode types */
  83.  
  84.     
  85. typedef enum 
  86.     {
  87.     nul = 0,
  88.     
  89.     and,
  90.     tad,
  91.     isz,
  92.     dca,
  93.     jms,
  94.     jmp,
  95.     io,
  96.     
  97.     cll,
  98.     cma,
  99.     cml,
  100.     iac,
  101.     rar,
  102.     ral,
  103.     rtr,
  104.     rtl,
  105.     nop,
  106.     
  107.     sma,
  108.     sza,
  109.     snl,
  110.     spa,
  111.     sna,
  112.     szl,
  113.     cla,
  114.     osr,
  115.     hlt,
  116.     
  117.     org,
  118.     equ,
  119.     end,
  120.     data,
  121.     store
  122.     } opcode;